var course_boxes = {
    edit : {
        initialize : function (id) {
            $("#course_container").css("border", "1px dashed");
            $("#s" + id + "_brief").css("border", "1px dashed");
            $("#s" + id + "_additional").css("border", "1px dashed");   
            $("#edit_content_area").css("visibility", "visible");
            $("#edit_content_area").children().each (function () {
                $(this).css("visibility", "visible");
            })
        },
        save : function () {
            $.ajax({
                async: false,
                type: 'POST',
                url: "/modules/course_boxes/save.php",
                data: {
                    brief_1: document.getElementById("s1_brief").innerHTML,
                    content_1: document.getElementById("s1_additional").innerHTML,
                    brief_2: document.getElementById("s2_brief").innerHTML,
                    content_2: document.getElementById("s2_additional").innerHTML,
                    brief_3: document.getElementById("s3_brief").innerHTML,
                    content_3: document.getElementById("s4_additional").innerHTML,
                    brief_4: document.getElementById("s4_brief").innerHTML,
                    content_4: document.getElementById("s4_additional").innerHTML,
                    brief_5: document.getElementById("s5_brief").innerHTML,
                    content_5: document.getElementById("s5_additional").innerHTML,
                    brief_6: document.getElementById("s6_brief").innerHTML,
                    content_6: document.getElementById("s6_additional").innerHTML
                },
                success: function (result) {
                    alert(result);
                }
            });
        }
        
    }
};

